package com.xbongbong.paas.log.model;

import com.xbongbong.paas.log.entity.OperateDetailLogEntity;
import com.xbongbong.paas.log.entity.OperateLogEntity;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;

import java.util.List;
import java.util.Map;

/**
 * 操作日志相关业务
 * @author kaka
 * @version v1.0
 * @date 2019/1/22 20:19
 * @since v1.0
 */
public interface OperateLogModel extends IModel<OperateLogEntity> {

    Integer insertWithoutAsync(OperateLogEntity entity) throws XbbException;

    /**
     * 保存操作日志及操作日志详情
     * @param entity 操作日志
     * @param operateDetailLogEntity 日志详情
     * @return java.lang.Integer
     * @throws XbbException
     * @author zcp
     * @date 2019/6/26 15:36
     * @since v1.0
     * @version v1.0
     */
    Integer insertIncludeDetail(OperateLogEntity entity, OperateDetailLogEntity operateDetailLogEntity) throws XbbException;

    /**
     * Description: 没有异步的保存操作日志及操作日志详情
     * @param entity
     * @param operateDetailLogEntity
     * @return java.lang.Integer
     * @author 魏荣杰
     * @date 2019/12/4 5:21 下午
     * @since v4.7.1
     */
    Integer insertIncludeDetailWithoutAsync(OperateLogEntity entity, OperateDetailLogEntity operateDetailLogEntity) throws XbbException;

    /**
     * 重载 查询条件加入是否导出入口
     * @param param
     * @param isExport 是否导出
     * @return
     * @throws XbbException
     */
    List findEntitys(Map<String, Object> param,boolean isExport) throws XbbException;
}
